<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="UTF-8" />
		<title>修改计划</title>
		
		<link rel="stylesheet" th:href="@{/css/layout.css}" />
	</head>
	<body>
		<div class="container">
			<form id="planForm" th:action="@{/plan/modify}" method="post">
				<input type="hidden" name="planId" th:value="${plan.planId}">
				<div class="form-wrap">
					<span>计划日期<label class="error">*</label> <label id="planDateError" class="error"></label></span>
					<div>
						<input type="date" name="planDate1" id="planDate" th:value="${plan.planDate1Str}">
					</div>
				</div>
				<div class="form-wrap">
					<span>用户名称<label class="error">*</label> <label id="userIdError" class="error"></label></span>
					<div>
						<select name="userId" id="userId">
							<option value="">请选择</option>
							<th:block th:each="user : ${users}">
								<option th:selected="${plan.userId eq user.userId}" th:value="${user.userId}" th:text="${user.userName}"></option>
							</th:block>
						</select>
					</div>
				</div>
				<div class="form-wrap">
					<span>计划名称<label class="error">*</label> <label id="planNameError" class="error"></label></span>
					<div>
						<input type="text" name="planName" id="planName" th:value="${plan.planName}">
					</div>
				</div>
				<div class="form-wrap">
					<span>数量<label class="error">*</label> <label id="countError" class="error"></label></span>
					<div>
						<input type="number" min="0" name="count" id="count" th:value="${plan.count}">
					</div>
				</div>
				<div class="">
					<input type="button" class="btn" value="提交" onclick="submitForm()">
					<input type="button" class="btn" value="取消" onclick="window.close()">
				</div>
			</form>
		</div>
		
		<script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
		<script type="text/javascript" th:inline="javascript">
			var ctx = [[@{/}]];
		</script>
		<script type="text/javascript" th:src="@{/js/plan/plan.modify.js}"></script>
	</body>
</html>